package AbstractMember;

import java.util.ArrayList;
import java.util.List;

public class Group extends AbstractMember {
    private List<AbstractMember> members = new ArrayList<>();
    public Group(String name) {
        this.name = name;
    }
    @Override
    public void shareTo(AbstractMember member) {
        for (AbstractMember Member : members) {
            Member.shareTo(member);
        }
    }
    public void addMember(AbstractMember member) {
        members.add(member);
    }
    public void removeMember(AbstractMember member) {
        members.remove(member);
    }
}
